﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WikiQuizz.Common.Resource;

namespace WikiQuizz.Common.Entities
{
    public class WikiPageEntity
    {
        /// <summary>
        /// Page id of the wikipedia document
        /// </summary>
        public int PageId { get; set; }

        /// <summary>
        /// Title of the wikipedia document
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// Last revision id of the wikipedia document
        /// </summary>
        public int LastRevId { get; set; }

        /// <summary>
        /// Last update of the dataentry
        /// </summary>
        public DateTime LastUpdate { get; set; }
        
        /// <summary>
        /// Is every property different from "error"?
        /// </summary>
        public virtual bool IsValid
        {
            get
            {
                return !Title.Equals(Strings.ERROR);
            }
        }
    }
}
